/**
 * Created by pankajmishra on 16/12/14.
 */
define(['jquery', 'module/home/customEvent','module/template/homeTemplate'], function ($, customEvent,template) {
    return function (datalength, pageSize, eventName) {

        $('.main-content').children('.js_more').remove();
        if(datalength >= pageSize){
            $('.main-content').append(template['home-update-more']);
            $('.js_morebotton').click(function () {
                $.event.trigger({
                    type: eventName,
                    append: true
                });
            });
        }
    }
});
